﻿@{
    ViewData["Title"]="TableAPI Demo";
    Layout="~/Views/Shared/_Form.cshtml";
}
<script>
    var pageUrl = "";
    var keyValue = $.request("keyValue");//id
    var IsEdit = $.request("IsEdit");
    $(function () {
        initControl();
    });
    function initControl() {

    }
</script>
<form id="form1">
    <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
        <div style="padding-top: 20px; margin-right: 30px;">
            <input type="hidden" id="id" name="id" value="" />
            <table class="form">
                <tr>
                    <th class="formTitle" style="width:120px;">单选部门：</th>
                    <td class="formValue">
                        <div class="input-group" style="width:99%;">
                            <input type="hidden" id="p_id" name="p_id" autocomplete="off" class="form-control" />
                            <input type="text" id="p_name" name="p_name" class="form-control" value="" />
                            <div class="input-group-btn">
                                <a href="#" onclick="selectTable('p_id', 'p_name', 'Base_Branch', { conditions: {whereStr:'Bran_name=\'校领导\''}, search:'Bran_name',columns: { Bran_number:'ID',Bran_name: '名称' },fields:{ID:'Bran_number',NAME:'Bran_name'}});" class="btn btn-default" style="height:35px;">
                                    <i class="glyphicon glyphicon-chevron-down"></i>
                                </a>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle" style="width:120px;">多选部门：</th>
                    <td class="formValue">
                        <div class="input-group" style="width:99%;">
                            <input type="hidden" id="p_id1" name="p_id1" autocomplete="off" class="form-control">
                            <input type="text" id="p_name1" name="p_name1" class="form-control" value="" />
                            <div class="input-group-btn">
                                <a href="#" onclick="selectTable('p_id1', 'p_name1', 'Base_Branch', {checkbox:true, conditions: {whereStr:'Bran_name=\'校领导\''}, search:'Bran_name',columns: { Bran_number:'ID',Bran_name: '名称' },fields:{ID:'Bran_number',NAME:'Bran_name'}});" class="btn btn-default" style="height:35px;">
                                    <i class="glyphicon glyphicon-chevron-down"></i>
                                </a>
                            </div>
                        </div>

                    </td>
                </tr>
                <tr>
                    <th class="formTitle" style="width:120px;">SQL语句：</th>
                    <td class="formValue">
                        <div class="input-group" style="width:99%;">
                            <input type="hidden" id="p_id2" name="p_id2" autocomplete="off" class="form-control">
                            <input type="text" id="p_name2" name="p_name2" class="form-control" value="" />
                            <div class="input-group-btn">
                                <a href="#" onclick="selectTable('p_id2', 'p_name2', 'Base_Branch', {checkbox:true, conditions: {Bran_name:'校领导'}, search:'Bran_name',columns: { Bran_number:'ID',Bran_name: '名称' },fields:{ID:'Bran_number',NAME:'Bran_name'},sql:'SELECT Bran_number,Bran_name FROM Base_Branch'});" class="btn btn-default" style="height:35px;">
                                    <i class="glyphicon glyphicon-chevron-down"></i>
                                </a>
                            </div>
                        </div>

                    </td>
                </tr>
            </table>
        </div>
    </div>
</form>